package service;

import java.sql.SQLException;
import java.util.List;


import com.mysql.cj.conf.ConnectionUrlParser.Pair;

import entity.CommentVO;
import entity.Zremark;


public interface CommentService {
	//发表主评论
	public void insert(String email,String wordname,String type,String contant) throws SQLException;
	//撤回主评论
	public void delete(String email)  throws Exception;
	//更改主评论
	public void update(String email,CommentVO xl)  throws Exception;
	//查看主评论
	public List<CommentVO> select()  throws Exception;
	//点赞主评论
	public void addlike(int CommentID)  throws Exception;
	//踩扁主评论
	public void addhate(int CommentID)  throws Exception;
	//判断子评论
	public Boolean ishe(String email, Integer zremarkid) throws Exception;
	//撤回子评论
	public Boolean delzremark(String email, Integer zremarkid)  throws Exception;
	//发表子评论
	public Boolean addzremark(String email,String wordname , Integer remarkid, String contant)  throws Exception;
	//查看子评论
	public List<Zremark> getzremark(String wordname, Integer remarkid)  throws Exception;
	//查看所有评论
	public List<Pair<CommentVO,List<Zremark>>>  getall()  throws Exception;
	//查看该用户的主评论和子评论
	public List<Pair<CommentVO,List<Zremark>>>  getremark(String wordname)  throws Exception;
	
}
